package com.pink.utils;

import org.springframework.util.DigestUtils;

public class MD5ExampleUtils {
    //md5加密
    public static String encodeByMD5(String password){
        return DigestUtils.md5DigestAsHex(password.getBytes());
    }

    //md5校验
    public static boolean checkByMD5(String password,String encodePassword){
        return password.equals(encodePassword);
    }
}
